import 'dart:convert';

void main() {
  String value = '''
  {
"page":"test",
"list":[
"test",
"test",
"test"
]
}
  ''';
  // final test = Test.fromJson(json.decode(value));

  final list = parse<String>('list', json.decode(value));
  print('object=$list');
}

List<T> parse<T>(name, map) {
  final value = map[name];
  if (value is List) {
    return value.cast<T>();
  }
  return null;
}
